|
Adjusting cell width When looking at the previous picture, it becomes obvious that FastReport automatically adjusts cells width in a way, which allows the longer lines to fit the cells. It is not desirable in some cases however, since the table with very long lines becomes not good-looking. What can be done in such case? The simplest way is to break lines in the text of object with intermediate totals, i.e. to insert a line into it: Total You see that the table looks better now:
However, not always such method can be used. If the lines’/columns’ values are rather long, they cannot be corrected by breaking the line manually. That is why the crossobject has the "MinWidth" and "MaxWidth" properties (minimal and maximal cell width respectively). Both these properties are accessible only via the object inspector. The "MinWidth" value is "0," and the "MaxWidth" value is "200" by default. This is quite enough in most cases. You can set your values, according to any special requirements concerning table design. Thus, in our example, we can set the following: MinWidth = MaxWidth = 50. This would signify that table cell width must be 50 pixels at any rate. If a cell is smaller, it is "adapted" to the "MinWidth" value, if it is bigger, its width is fixed according to the "MaxWidth" value, and the text in the cell is divided. In our example, it would look as follows:
|